翻訳と辞書
Words near each other
・ Instruction Concerning the Criteria for the Discernment of Vocations with regard to Persons with Homosexual Tendencies in view of their Admission to the Seminary and to Holy Orders
・ Instruction creep
・ Instruction cycle
・ Instruction in Latin
・ Instruction list
・ Instruction of Amenemope
・ Instruction of Ankhsheshonq
・ Instruction of Any
・ Instruction of Hardjedef
・ Instruction on transliteration of Belarusian geographical names with letters of Latin script
・ Instruction path length
・ Instruction pipelining
・ Instruction prefetch
・ Instruction register
・ Instruction scheduling
Instruction selection
・ Instruction set
・ Instruction set simulator
・ Instruction step
・ Instruction unit
・ Instruction window
・ Instruction-level parallelism
・ Instructional animation
・ Instructional capital
・ Instructional design
・ Instructional design coordinator
・ Instructional leadership
・ Instructional manipulation check
・ Instructional modeling
・ Instructional rounds


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Instruction selection : ウィキペディア英語版
Instruction selection

In computer science, instruction selection is the stage of a compiler backend that transforms its tree-based middle-level intermediate representation (IR) into a low-level IR very close to its final target language. In a typical compiler, it precedes both instruction scheduling and register allocation, so its output IR has an infinite set of pseudoregisters and may still be subject to peephole optimization; otherwise, it closely resembles the target machine code, bytecode, or assembly language. It works by "covering" the intermediate representation with as few ''tiles'' as possible. A tile is a template that matches a portion of the IR tree and can be implemented with a single target instruction. For trees the pattern selection problem can be solved optimally in linear time, but for DAGs and full-fledged graphs the problem becomes NP-complete and is thus commonly addressed using heuristics or methods from combinatorial optimization.
== Approach ==

A basic approach in instruction selection is to use some templates for translation of each instruction in an intermediate representation. But naïve use of templates leads to inefficient code in general. Additional attention needs to be paid to avoid duplicated memory access by reordering and merging instructions and promoting the usage of registers.
For example, see the following sequence of intermediate instructions:

t1 = a
t2 = b
t3 = t1 + t2
a = t3
b = t1

A good tiling for the x86 architecture is a succinct set of instructions:

MOV EAX, a
XCHG EAX, b
ADD a, EAX

Typically, instruction selection is implemented with a backwards dynamic programming algorithm which computes the "optimal" tiling for each point starting from the end of the program and based from there. Instruction selection can also be implemented with a greedy algorithm that chooses a local optimum at each step.
The code that performs instruction selection is usually automatically generated from a list of valid patterns. Various generator programs differ in the amount of analysis that they perform while they run, rather during the compiler's instruction selection phase.


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Instruction selection」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.